package com.wind.trademark.user.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * AccRole entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "acc_role", catalog = "mypro")
public class AccRole implements java.io.Serializable {

	// Fields

	private Long id;
	private String name;
	private String enable;
	private Long createBy;
	private Date createTime;
	private Long lastUpdateBy;
	private Date lastUpdateTime;

	// Constructors

	/** default constructor */
	public AccRole() {
	}

	@Override
	public String toString() {
		return "AccRole [id=" + id + ", name=" + name + ", enable=" + enable
				+ ", createBy=" + createBy + ", createTime=" + createTime
				+ ", lastUpdateBy=" + lastUpdateBy + ", lastUpdateTime="
				+ lastUpdateTime + "]";
	}


	// Property accessors
	@Id
	@GeneratedValue(generator = "generator")    
	@GenericGenerator(name = "generator", strategy = "increment") 
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "NAME", nullable = false, length = 20)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "ENABLE", length = 1)
	public String getEnable() {
		return this.enable;
	}

	public void setEnable(String enable) {
		this.enable = enable;
	}

	@Column(name = "CREATE_BY", nullable = false)
	public Long getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(Long createBy) {
		this.createBy = createBy;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATE_TIME", nullable = false, length = 10)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "LAST_UPDATE_BY", nullable = false)
	public Long getLastUpdateBy() {
		return this.lastUpdateBy;
	}

	public void setLastUpdateBy(Long lastUpdateBy) {
		this.lastUpdateBy = lastUpdateBy;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "LAST_UPDATE_TIME", nullable = false, length = 10)
	public Date getLastUpdateTime() {
		return this.lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	

}